<?php
namespace app\admin\validate;

use think\Validate;

class Product extends Validate
{
    protected $rule = [
        'pro_name' => 'require',
        'pro_dec' => 'require',
        'pro_info' => 'require'
    ];

    protected $message = [
        'pro_name.require' => '请填写产品名称',
        'pro_dec.require' => '请填写产品描述',
        'pro_info.require' => '请填写产品详情'
    ];

    protected $scene = [
        'add'   => ['pro_name', 'pro_dec', 'pro_info'],
        'edit'  => ['pro_name', 'pro_dec', 'pro_info'],
        'password' => ['password', 'repassword'],
        'status' => ['status'],
        'name' => ['name'],
    ];
}